import request from '@/utils/request'

// 查询设备故障记录列表
export function listFault(query) {
  return request({
    url: '/equipment/fault/list',
    method: 'get',
    params: query
  })
}

// 查询设备故障记录详细
export function getFault(recordid) {
  return request({
    url: '/equipment/fault/' + recordid,
    method: 'get'
  })
}

// 新增设备故障记录
export function addFault(data) {
  return request({
    url: '/equipment/fault',
    method: 'post',
    data: data
  })
}

// 修改设备故障记录
export function updateFault(data) {
  return request({
    url: '/equipment/fault',
    method: 'put',
    data: data
  })
}

// 删除设备故障记录
export function delFault(recordid) {
  return request({
    url: '/equipment/fault/' + recordid,
    method: 'delete'
  })
}
